import { join } from 'path'
import { prefixUrl } from '../utils/utils'
export default (): any => ({
  database: {
    type: process.env.DB_TYPE,
    host: process.env.DB_HOST,
    port: process.env.DB_PORT,
    password: process.env.DB_PASSWORD,
    username: process.env.DB_USERNAME,
    database: process.env.DB_DATABASE,
    entities: [join(__dirname, '../', '**/**.entity{.ts,.js}')],
    synchronize: process.env.NODE_ENV !== 'production',
  },
  whiteList: [
    // prefixUrl<string>('auth'),
    prefixUrl<string>('auth/register'),
    prefixUrl<string>('auth/login'),
    prefixUrl<string>('pcas'),
  ],
  appId: 'wx002ac7c3140d45e0', // 微信小程序AppID
  appSecret: '363648f2214e3945c473a8b8a4f7e5ad', // 微信小程序AppSecret
})
